# 循环语句： while，for
count = 1
sum = 0
while count <= 100:
    sum = sum + count
    count = count + 1
print(sum) # 5050

sum = 0
for i in range(1, 101): # 1.13模块编程.12package <= i < 101
    sum = sum + i
print(sum) # 5050

count = 1
sum = 0
while count <= 100:
    sum = sum + count
    if sum > 1000: # 当符合条件时，跳出循环
        break
    count = count + 1
print( count)
print(sum)

count = 1
sum = 0
while count <= 100:
    if count % 2 == 0: # 偶数时，过滤掉
        count = count + 1
        continue
    sum = sum + count
    count = count + 1
print(sum)
